package com.bee.auth.common.vo;


import com.bee.user.client.dto.ResourceDTO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 菜单资源
 * @author Damin.yang
 * @date 2019/8/27 9:20
 */
@Data
public class MenuVO {

    private Long id;

    private String name;

    private String code;

    private Long parentId;

    private String serviceId;

    private String url;

    private Integer sort;

    private List<MenuVO> subs;

    public static MenuVO covert(ResourceDTO dto) {
        MenuVO vo = new MenuVO();
        BeanUtils.copyProperties(dto, vo);
        return vo;
    }
}
